package com.itheima.mapper;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

import java.util.List;

public interface UserMapper {

    @Select("select * from user")
    public List<User> findAll();

    @Select("select * from user where id=#{id}")
    public User findById(int id);

    @Update("update user set username=#{username},age=#{age},password=#{password},email=#{email},sex=#{sex} where id=#{id}")
    public void update(User user);
}
